﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

  <!-- Default spinner brush -->
  <SolidColorBrush x:Key="spinnerRectangleBrush"
                   Color="Blue" />

  <!-- Style for spinner rectangles -->
  <Style x:Key="spinnerRectangle"
         TargetType="Rectangle">
    <Setter Property="RadiusX"
            Value="5" />
    <Setter Property="RadiusY"
            Value="5" />
    <Setter Property="Width"
            Value="50" />
    <Setter Property="Height"
            Value="20" />
    <Setter Property="Fill"
            Value="{StaticResource spinnerRectangleBrush}" />
    <Setter Property="Canvas.Left"
            Value="220" />
    <Setter Property="Canvas.Top"
            Value="140" />
    <Setter Property="Opacity"
            Value="0.1" />
  </Style>

  <Canvas Height="300"
          Width="300"
          Background="Transparent"
          HorizontalAlignment="Center"
          VerticalAlignment="Center"
          x:Key="spinnerCanvas"
          x:Shared="False">
    <!-- First quadrant -->
    <Rectangle Style="{StaticResource spinnerRectangle}"
               Opacity="1" />
    <Rectangle Style="{StaticResource spinnerRectangle}">
      <Rectangle.RenderTransform>
        <RotateTransform Angle="22.5"
                         CenterX="-70"
                         CenterY="10" />
      </Rectangle.RenderTransform>
    </Rectangle>
    <Rectangle Style="{StaticResource spinnerRectangle}">
      <Rectangle.RenderTransform>
        <RotateTransform Angle="45"
                         CenterX="-70"
                         CenterY="10" />
      </Rectangle.RenderTransform>
    </Rectangle>
    <Rectangle Style="{StaticResource spinnerRectangle}">
      <Rectangle.RenderTransform>
        <RotateTransform Angle="67.5"
                         CenterX="-70"
                         CenterY="10" />
      </Rectangle.RenderTransform>
    </Rectangle>

    <!-- Second quadrant -->
    <Rectangle Style="{StaticResource spinnerRectangle}">
      <Rectangle.RenderTransform>
        <RotateTransform Angle="90"
                         CenterX="-70"
                         CenterY="10" />
      </Rectangle.RenderTransform>
    </Rectangle>
    <Rectangle Style="{StaticResource spinnerRectangle}">
      <Rectangle.RenderTransform>
        <RotateTransform Angle="112.5"
                         CenterX="-70"
                         CenterY="10" />
      </Rectangle.RenderTransform>
    </Rectangle>
    <Rectangle Style="{StaticResource spinnerRectangle}">
      <Rectangle.RenderTransform>
        <RotateTransform Angle="135"
                         CenterX="-70"
                         CenterY="10" />
      </Rectangle.RenderTransform>
    </Rectangle>
    <Rectangle Style="{StaticResource spinnerRectangle}">
      <Rectangle.RenderTransform>
        <RotateTransform Angle="157.5"
                         CenterX="-70"
                         CenterY="10" />
      </Rectangle.RenderTransform>
    </Rectangle>

    <!-- Third quadrant -->
    <Rectangle  Style="{StaticResource spinnerRectangle}"
                Opacity="0.2">
      <Rectangle.RenderTransform>
        <RotateTransform Angle="180"
                         CenterX="-70"
                         CenterY="10" />
      </Rectangle.RenderTransform>
    </Rectangle>
    <Rectangle  Style="{StaticResource spinnerRectangle}"
                Opacity="0.3">
      <Rectangle.RenderTransform>
        <RotateTransform Angle="202.5"
                         CenterX="-70"
                         CenterY="10" />
      </Rectangle.RenderTransform>
    </Rectangle>
    <Rectangle  Style="{StaticResource spinnerRectangle}"
                Opacity="0.4">
      <Rectangle.RenderTransform>
        <RotateTransform Angle="225"
                         CenterX="-70"
                         CenterY="10" />
      </Rectangle.RenderTransform>
    </Rectangle>
    <Rectangle  Style="{StaticResource spinnerRectangle}"
                Opacity="0.5">
      <Rectangle.RenderTransform>
        <RotateTransform Angle="247.5"
                         CenterX="-70"
                         CenterY="10" />
      </Rectangle.RenderTransform>
    </Rectangle>

    <!-- Fourth quadrant -->
    <Rectangle  Style="{StaticResource spinnerRectangle}"
                Opacity="0.6">
      <Rectangle.RenderTransform>
        <RotateTransform Angle="270"
                         CenterX="-70"
                         CenterY="10" />
      </Rectangle.RenderTransform>
    </Rectangle>
    <Rectangle  Style="{StaticResource spinnerRectangle}"
                Opacity="0.7">
      <Rectangle.RenderTransform>
        <RotateTransform Angle="292.5"
                         CenterX="-70"
                         CenterY="10" />
      </Rectangle.RenderTransform>
    </Rectangle>
    <Rectangle  Style="{StaticResource spinnerRectangle}"
                Opacity="0.8">
      <Rectangle.RenderTransform>
        <RotateTransform Angle="315"
                         CenterX="-70"
                         CenterY="10" />
      </Rectangle.RenderTransform>
    </Rectangle>
    <Rectangle  Style="{StaticResource spinnerRectangle}"
                Opacity="0.9">
      <Rectangle.RenderTransform>
        <RotateTransform Angle="337.5"
                         CenterX="-70"
                         CenterY="10" />
      </Rectangle.RenderTransform>
    </Rectangle>
  </Canvas>

</ResourceDictionary>